package top.mschen.blog.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.mschen.blog.entity.Article;
import top.mschen.blog.entity.ArticleKey;
import top.mschen.blog.entity.ArticleWithBLOBs;

import java.util.List;

@Mapper
public interface ArticleMapper {
    int deleteByPrimaryKey(ArticleKey key);

    int insert(ArticleWithBLOBs record);

    int insertSelective(ArticleWithBLOBs record);

    ArticleWithBLOBs selectByPrimaryKey(ArticleKey key);

    int updateByPrimaryKeySelective(ArticleWithBLOBs record);

    int updateByPrimaryKeyWithBLOBs(ArticleWithBLOBs record);

    int updateByPrimaryKey(Article record);

    List<ArticleWithBLOBs> selectByPage(@Param("startLimit") int startLimit, @Param("count") int count);
}